;(function(root, factory) {
  if (typeof define === 'function' && define.amd) {
    define(['exports', 'echarts'], factory)
  } else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') {
    factory(exports, require('echarts'))
  } else {
    factory({}, root.echarts)
  }
})(this, function(exports, echarts) {
  var log = function(msg) {
    if (typeof console !== 'undefined') {
      console && console.error && console.error(msg)
    }
  }
  if (!echarts) {
    log('ECharts is not Loaded')
    return
  }
  var contrastColor = '#EEE'
  echarts.registerTheme('mytheme', {
    color: ['#c1232b', '#02a6b5', '#FFB800', '#00dd21', '#FF5722', '#009688', '#1E9FFF'],
    backgroundColor: 'rgba(0,0,0,0)',
    textStyle: {},
    title: {
      textStyle: {
        color: contrastColor,
      },
      subtextStyle: {
        color: contrastColor,
      },
    },
    line: {
      itemStyle: {
        normal: {
          borderWidth: 1,
        },
      },
      lineStyle: {
        normal: {
          width: '3',
        },
      },
      symbolSize: '5',
      symbol: 'emptyCircle',
      smooth: false,
    },
    radar: {
      itemStyle: {
        normal: {
          borderWidth: 1,
        },
      },
      lineStyle: {
        normal: {
          width: '3',
        },
      },
      symbolSize: '5',
      symbol: 'emptyCircle',
      smooth: false,
    },
    bar: {
      itemStyle: {
        normal: {
          barBorderWidth: 0,
          barBorderColor: '#ccc',
        },
        emphasis: {
          barBorderWidth: 0,
          barBorderColor: '#ccc',
        },
      },
    },
    pie: {
      itemStyle: {
        normal: {
          borderWidth: 0,
          borderColor: '#ccc',
        },
        emphasis: {
          borderWidth: 0,
          borderColor: '#ccc',
        },
      },
    },
    legend: {
      textStyle: {
        color: '#333333',
      },
    },
    tooltip: {
      axisPointer: {
        lineStyle: {
          color: '#27727b',
          width: 1,
        },
        crossStyle: {
          color: '#27727b',
          width: 1,
        },
      },
    },
  })
})
